import request from "@/utils/request";

// api地址
const api = {
  order: "checkout/order",
  submit: "checkout/submit",
  query: "checkout/orderquery",
  getphone: "checkout/getphone",
  createbook: "checkout/createbook",
  cancelbook: "checkout/cancelbook",
  mplog: "report/mplog",
};

// mode: 结算模式 (buyNow立即购买 cart购物车)

// 结算台订单信息
export const order = (mode, param) => {
  return request.get(api.order, { mode, ...param });
};

// 结算台订单提交
export const submit = (mode, data) => {
  return request.post(api.submit, { mode, ...data });
};
export const query = (data) => {
  return request.post(api.query, { ...data });
};
export const getphone = (data) => {
  return request.post(api.getphone, { ...data });
};
export const createbook = (data) => {
  return request.post(api.createbook, { ...data });
};
export const cancelbook = (data) => {
  return request.post(api.cancelbook, { ...data });
};
export const mplog = (data) => {
  return request.post(api.mplog, { ...data });
};
